package com.shike.core.utils;

public class DateUtil {

    public final static String  SPLIT_SYMBOL = "-";

    /**
     * js日期转java
     * @param year
     * @param month
     * @param date
     * @return
     */
    public static String jsToJavaDate(Integer year, Integer month, Integer date){
        if (month == -1 ){
            year -= 1;
            month = 12;
        }else {
            month += 1;
        }
        return String.format("%d%s%d%s%d", year, SPLIT_SYMBOL,  month, SPLIT_SYMBOL, date);
    }
}
